//
//  CCMHeadViewCell.swift
//  CCMoney_swift
//
//  Created by JKHuang on 2018/11/30.
//  Copyright © 2018 JKHuang. All rights reserved.
//

import UIKit

class CCMHeadViewCell: UITableViewCell {

    fileprivate lazy var headView:UIImageView = {
        let image = UIImageView()
        image.contentMode = .scaleAspectFill
        image.layer.cornerRadius = 28
        image.clipsToBounds = true
        return image
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}

extension CCMHeadViewCell{
    
    fileprivate func setUI(){
        self.contentView.addSubview(self.headView)
        self.headView.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.contentView)
            make.leading.equalTo(self.contentView).offset(15)
            make.width.height.equalTo(60)
        }
    }
}
